layui.extend({
    baseConfig : "/js/pages/baseConfig"
})
layui.use(['layer','table','laytpl','element','util','baseConfig'],function(){

    var layer = parent.layer === undefined ? layui.layer : top.layer,
        table = layui.table,
        baseConfig = layui.baseConfig,
        $ = layui.jquery;
    var tableIns = table.render({
        elem: '#list',
        url : '/suammary/employee/',
        text: { none: "Aucun résultat"},
        cellMinWidth : 95,
        height : "full-10",
        totalRow : true, //开启合计行
        id : "listTable",
        cols : [[
            {field: 'jobNumber', title: "员工工号", align:"center", templet : function( d){
                if ( d.idAgree == "1") {
                    return "";
                }else{
                    return d.jobNumber;
                }
            }},
            {field: 'nom', title: "姓", align:"center"},
            {field: 'prenom', title: "名", align:"center"},
        //    {field: 'cardNo', title: "卡号", align:"center"},
            {field: 'totalRecharge', title: "总充值", align:"center"},
            {field: 'totalConsumer', title: "总消费", align:"center"},
            {field: 'balance', title: "余额", totalRow: true,align:"center"},
            {field: 'validBalance', title: "可用余额", totalRow: true,align:"center"},
            {field: 'threeRecharge', totalRow: true,title: "前三个月充值", align:"center"},
            {field: 'towRecharge', totalRow: true,title: "前两个月充值", align:"center"},
            {field: 'oneRecharge', totalRow: true,title: "前一个月充值", align:"center"},
            {field: 'thisRecharge', totalRow: true,title: "本月充值", align:"center"},
      //      {field: 'threeExport', totalRow: true, title: "前三个月出口", align:"center"},
      //      {field: 'twoExport', totalRow: true,title: "前两个月出口", align:"center"},
      //      {field: 'oneExport', totalRow: true,title: "前一个月出口", align:"center"},
      //      {field: 'thisExport', totalRow: true,title: "本月出口", align:"center"},
            {field: 'lastDayConsumer', totalRow: true,title: "昨天消费", align:"center"},
            {field: 'thirtyDayConsumer', totalRow: true,title: "30天消费", align:"center"}
        ]],
        response : {
            statusCode: 200 //规定成功的状态码，默认：0
        },
        parseData : function( res){ //res 即为原始返回的数据
            return {
                "code": res.code, //解析接口状态
                "msg": res.msg, //解析提示文本
                "data": res.data //解析数据列表
            };
        }
    });
});
